package com.zzy.backend.mapper;

import com.zzy.backend.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author molimark<br />
 * @date: 2022/12/20 22:16<br/>
 * @description: <br/>
 */

@Repository
@Transactional
public interface UserMapper {
    List<User> listUsers();

    User getUser(@Param("id") int userId);

    void addUser(User user);

    User searchUserByUsername(@Param("username")String username);

    User selectById(@Param("userId") Integer userId);
}
